package com.fhz.a2102shopjava.ui.details;

import androidx.lifecycle.LiveData;

import com.fhz.a2102shopjava.base.BaseRepository;
import com.fhz.a2102shopjava.callback.ApiResponse;
import com.fhz.a2102shopjava.entity.Orders;
import com.fhz.a2102shopjava.entity.ShoppingCart;

import java.util.List;

import javax.inject.Inject;

import retrofit2.http.Body;
import retrofit2.http.GET;

/**
 * 时间:2023/8/16
 *
 * @author Mr.Feng
 * 简述: 详情仓库
 */

public class DetailsRepository {
    @Inject
    DetailsLocalDataSource mDetailsLocalDataSource;
    @Inject
    DetailsRemoteDataSource mDetailsRemoteDataSource;

    @Inject
    public DetailsRepository(DetailsLocalDataSource detailsLocalDataSource, DetailsRemoteDataSource detailsRemoteDataSource) {
        mDetailsLocalDataSource = detailsLocalDataSource;
        mDetailsRemoteDataSource = detailsRemoteDataSource;
    }

    public LiveData<ApiResponse<List<ShoppingCart>>> addCart(ShoppingCart cart){
        return mDetailsRemoteDataSource.addCart(cart);
    }



}
